<#include "/common/header.html">
    <div class="main-container container">
        <!-- msg include -->
        <div class="row">
            <div class="col-md-9">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <div class="btu-group ">
                            <a href="/"
                               class="btn btn-xs <#if " all" == sectionName >btn-info</#if>">全部</a>
                            <a href="/!hot"
                               class="btn btn-xs <#if " hot" == sectionName >btn-info</#if>">热门</a>
                            <a href="/!focused"
                               class="btn btn-xs <#if " focused" == sectionName >btn-info</#if>">关注</a>
                            <#list sections as section>
                                <a href="/!${section.name}"
                                   class="btn btn-xs <#if section.name == sectionName >btn-info</#if>">${section.name}</a>
                            </#list>
                        </div>
                    </div>
                    <ul class="list-group-panel-body list-group">
                        <#list topics as topic>
                            <li class="list-group-item">
                                <div class="media">
                                    <div class="media-left">
                                        <a href=" /users/${topic.user.id}/topics"> <img
                                                class="media-object" src="${topic.user.avatar}" width="48px"
                                                alt="${topic.user.nick}">
                                        </a>
                                    </div>
                                    <div class="media-body">
                                        <p>
                                            <a href=" /nodes/${topic.node.id}"
                                               class="btn btn-info btn-xs">${topic.node.name}</a> <a
                                                href=" /topics/${topic.id}" class="media-title">${topic.title}
                                        </a>
                                        </p>
                                        <p class="meta">
                                            <a href=" /users/${topic.user.id}/topics">
                                                ${topic.user.nick}</a> •flashBack
                                            <#if topic.lastCommentUser ? exists>•
                                                <a href=" /users/${topic.lastCommentUser.id}/topics">
                                                    ${topic.lastCommentUser.nick}</a>•flashBack
                                            </#if>
                                        </p>
                                    </div>
                                    <div class="media-right media-middle">
                                        <span class="badge">${topic.commentCount}</span>
                                    </div>
                                </div>
                            </li>
                        </#list>
                    </ul>
                    <div class="panel-footer ">

                    </div>
                </div>
            </div>
            <div class="col-md-3 sidebar">
                <div class="panel panel-info">
                    <div class="panel-body">
                        <div class="col-md-12">
                            <a href="/topics/create"
                               class="btn btn-lg btn-info btn-block"> 发布新话题 </a>
                        </div>
                    </div>
                </div>
                <div class="panel panel-info">
                    <div class="panel-heading">AD</div>
                    ${Application["ad_side"].content}
                </div>

                <div class="panel panel-info">
                    <div class="panel-heading">热门节点</div>
                    <#list hotNodes as node>
                        <a class="btn btn-info btn-xs btn-tag" href="/nodes/${node.id}">${node.name}</a>
                    </#list>
                    <a class="btn btn-info btn-xs btn-tag" href="/nodes/"><span class="fa fa-th"></span> 所有节点</a>
                </div>
            </div>
        </div>
        <#include "/common/footer.html">